<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" 
			content="width=device-width,height=device-height,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
		<title>2048</title>
		<link rel="stylesheet" type="text/css" href="2048.css" />
        <link rel="shortcut icon" href="#" />
		
		<script type="text/javascript" src="jQuery_3.4.1_min.js"></script>
		<script type="text/javascript" src="main2048.js"></script>
		<script type="text/javascript" src="showanimation2048.js"></script>
		<script type="text/javascript" src="support2048.js"></script>
		
	</head>
	<body>
		<header>
			<h1>王者之路</h1>
			<div id="button">
				<a href="javascript:newgame();" id = "newgamebutton">New Game</a>
			</div>
			<div id="grade">
				难度：
			</div>
			<div class = "dificulty" id="dificulty-1">
				简单
			</div>
			<div class = "dificulty" id="dificulty-2">
				普通
			</div>
			<div class = "dificulty" id="dificulty-3">
				困难
			</div>
			
		<!-- 	<div id="foote">
			请使用键盘的上、下、左、右或者W、A、S、D进行控制；<br>
			也可使用回车键开始新的游戏<br>
			点击音频插件后需要点击空白页面才能正常游戏！
			</div> -->
		</header>
		
		<div id="grid-container">
			
			<div class="grid-cell" id="grid-cell-0-0"></div>
			<div class="grid-cell" id="grid-cell-0-1"></div>
			<div class="grid-cell" id="grid-cell-0-2"></div>
			<div class="grid-cell" id="grid-cell-0-3"></div>
			
			<div class="grid-cell" id="grid-cell-1-0"></div>
			<div class="grid-cell" id="grid-cell-1-1"></div>
			<div class="grid-cell" id="grid-cell-1-2"></div>
			<div class="grid-cell" id="grid-cell-1-3"></div>
			
			<div class="grid-cell" id="grid-cell-2-0"></div>
			<div class="grid-cell" id="grid-cell-2-1"></div>
			<div class="grid-cell" id="grid-cell-2-2"></div>
			<div class="grid-cell" id="grid-cell-2-3"></div>
			
			<div class="grid-cell" id="grid-cell-3-0"></div>
			<div class="grid-cell" id="grid-cell-3-1"></div>
			<div class="grid-cell" id="grid-cell-3-2"></div>
			<div class="grid-cell" id="grid-cell-3-3"></div>
		</div>
		
		<div id="music">
			<a href="javascript:theMusic()">
				<img id="ks" src="./img/ks.jpg" />
				<img id="zt" src="./img/zt.jpg" >
				<audio id="music0" loop="loop"  preload="auto" autoplay="autoplay" src="music/杉卉先生%20-%20晴れが来る.mp3" ></audio>
			</a>
		</div><!-- autoplay="autoplay" -->
		<script>
			$('#ks').toggle();
			document.getElementById("music0").volume = 0.6;
            	$(document).ready(function(){
				
				var mo=function(e){e.preventDefault();}
				function stop(){
				    document.addEventListener("touchmove",mo,false);//禁止页面滑动
				}
				stop();
				
			});
            
             document.body.addEventListener('touchmove', (e) => {

                 e.preventDefault();

                }, { passive: false });
		</script>
	<footer>
		<div id="fen">得分：</div>
		<div id="lastfen">最高分：</div>
		<div id="score">0</div>
		<div id="lastscore">0</div>
	</footer>
	
	</body>
</html>
